<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>{{ username }}的聊天室</title>
</head>
<body>
    <h1>欢迎, {{ username }}</h1>
    
    {% for message in chat_messages %}
        <p>({{ message.timestamp }}) {{ message.from }}: {{ message.message }}</p>
    {% endfor %}
    
    <script>
        let timer=setTimeout(function() {
            location.reload()
        }, 5000)
    </script>
    
</body>
</html>